package com.guigui.gulimall.thridparty.oss;

import com.guigui.common.utils.R;
import com.guigui.gulimall.thridparty.component.SmsComponent;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class SmsController {

    @Autowired
    private SmsComponent smsComponent;

    @GetMapping("/sms/send")
    public R sendSmsCode(String phone, String code) {

        String s = smsComponent.sendSmsCode(phone, code);
        System.out.println(s);
        return R.ok();
    }
}
